/*
 * Copyright (c) 2018, dreamkaylee@foxmail.com All Rights Reserved.
 */

package com.limk.jconfig.entity;

import java.io.Serializable;
import java.util.List;

/**
 * @author limk
 * @date 2018年3月26日 下午12:51:22
 * @version
 */
public class Permission implements Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 2354878971224250744L;
	/**
	 * 唯一主键
	 */
	private Integer id;
	/**
	 * 权限名
	 */
	private String pname;
	/**
	 * 权限类型：menu 菜单，button 按钮
	 */
	private String type;
	/**
	 * 权限链接
	 */
	private String url;
	/**
	 * 参数：多个用&连接
	 */
	private String param;
	/**
	 * 图标
	 */
	private String icon;
	/**
	 * 权限识别码：**:query 查询,**:insert 插入,**:update 更新,**:delete 删除
	 */
	private String percode;
	/**
	 * 排序字段
	 */
	private Short sort;
	/**
	 * 状态 : 0 正常,1 禁用
	 */
	private Byte locked;
	/**
	 * 父权限
	 */
	private Integer parentid;
	private Permission permission;
	/**
	 * 子权限
	 */
	private List<Permission> children;
	
	private boolean checked;

	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public String getPname() {
		return pname;
	}

	public void setPname(String pname) {
		this.pname = pname == null ? null : pname.trim();
	}

	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type == null ? null : type.trim();
	}

	public String getUrl() {
		return url;
	}

	public void setUrl(String url) {
		this.url = url == null ? null : url.trim();
	}

	public String getParam() {
		return param;
	}

	public void setParam(String param) {
		this.param = param == null ? null : param.trim();
	}

	public String getIcon() {
		return icon;
	}

	public void setIcon(String icon) {
		this.icon = icon == null ? null : icon.trim();
	}

	public String getPercode() {
		return percode;
	}

	public void setPercode(String percode) {
		this.percode = percode == null ? null : percode.trim();
	}

	public Short getSort() {
		return sort;
	}

	public void setSort(Short sort) {
		this.sort = sort;
	}

	public Byte getLocked() {
		return locked;
	}

	public void setLocked(Byte locked) {
		this.locked = locked;
	}

	public Integer getParentid() {
		return parentid;
	}

	public void setParentid(Integer parentid) {
		this.parentid = parentid;
	}

	public Permission getPermission() {
		return permission;
	}

	public void setPermission(Permission permission) {
		this.permission = permission;
	}

	public List<Permission> getChildren() {
		return children;
	}

	public void setChildren(List<Permission> children) {
		this.children = children;
	}

	public boolean isChecked() {
		return checked;
	}

	public void setChecked(boolean checked) {
		this.checked = checked;
	}
}